/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package muets;

/**
 *
 * @author Dudu
 */
public class IPTableRule {
    private String name;
    private String chain;
    private String source;
    private String destination;
    private String protocol;
    private String source_port;
    private String destination_port;
    private String jump;

    public IPTableRule(String name,String chain, String source, String destination, String protocol, String source_port, String destination_port, String jump) {
        this.name="IPTableRule : "+source+" >> "+destination;
        this.chain = chain;
        this.source = source;
        this.destination = destination;
        this.protocol = protocol;
        this.source_port = source_port;
        this.destination_port = destination_port;
        this.jump = jump;
    }

    public IPTableRule(String name, String chain, String source, String destination, String jump) {
        this.name = name;
        this.chain = chain;
        this.source = source;
        this.destination = destination;
        this.jump = jump;
    }

    public IPTableRule() {

    }


    public String getChain() {
        return chain;
    }

    public String getDestination() {
        return destination;
    }

    public String getDestination_port() {
        return destination_port;
    }

    public String getJump() {
        return jump;
    }

    public String getProtocol() {
        return protocol;
    }

    public String getSource() {
        return source;
    }

    public String getSource_port() {
        return source_port;
    }

    public void setChain(String chain) {
        this.chain = chain;
    }

    public void setDestination(String destination) {
        this.destination = destination;
    }

    public void setDestination_port(String destination_port) {
        this.destination_port = destination_port;
    }

    public void setJump(String jump) {
        this.jump = jump;
    }

    public void setProtocol(String protocol) {
        this.protocol = protocol;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public void setSource_port(String source_port) {
        this.source_port = source_port;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final IPTableRule other = (IPTableRule) obj;
        if ((this.name == null) ? (other.name != null) : !this.name.equals(other.name)) {
            return false;
        }
        if ((this.chain == null) ? (other.chain != null) : !this.chain.equals(other.chain)) {
            return false;
        }
        if ((this.source == null) ? (other.source != null) : !this.source.equals(other.source)) {
            return false;
        }
        if ((this.destination == null) ? (other.destination != null) : !this.destination.equals(other.destination)) {
            return false;
        }
        if ((this.protocol == null) ? (other.protocol != null) : !this.protocol.equals(other.protocol)) {
            return false;
        }
        if ((this.source_port == null) ? (other.source_port != null) : !this.source_port.equals(other.source_port)) {
            return false;
        }
        if ((this.destination_port == null) ? (other.destination_port != null) : !this.destination_port.equals(other.destination_port)) {
            return false;
        }
        if ((this.jump == null) ? (other.jump != null) : !this.jump.equals(other.jump)) {
            return false;
        }
        return true;
    }

}
